package com.ysw.rpc.common.utils;

import java.util.concurrent.atomic.AtomicLong;

/**
 * @author YinShangwen
 * @since 2023/4/4 13:21
 */
public class IdUtil {
    private static final AtomicLong ATOMIC_ID = new AtomicLong(1L);

    /**
     * 生成请求ID
     *
     * @return id
     */
    public static Long generateId() {
        return ATOMIC_ID.incrementAndGet();
    }
}
